package arsmodeller.figure;

import org.eclipse.draw2d.ColorConstants;
import org.eclipse.draw2d.Figure;
import org.eclipse.draw2d.Label;
import org.eclipse.draw2d.LineBorder;
import org.eclipse.draw2d.XYLayout;
import org.eclipse.draw2d.geometry.Rectangle;

public class EnterpriseFigure extends Figure {
	private Label labelName = new Label();
	private Label labelOwner = new Label();
	private XYLayout layout;

	public EnterpriseFigure() {
		layout = new XYLayout();
		setLayoutManager(layout);
		labelName.setForegroundColor(ColorConstants.blue);
		add(labelName);
		setConstraint(labelName, new Rectangle(5, 5, -1, -1));
		setConstraint(labelOwner, new Rectangle(5, 30, -1, -1));
		setForegroundColor(ColorConstants.black);
		setBorder(new LineBorder(2));
	}

	public void setLayout(Rectangle rect) {
		setBounds(rect);
	}

	public void setName(String text) {
		labelName.setText(text);
	}

	public void setOwner(String text) {
		labelOwner.setText(text);
	}

}
